package zpin.dao;

import org.hibernate.Query;

import util.dao.HibernateDaoImpl;
import zpin.model.Authorization;

public class AuthorizationDaoImpl extends HibernateDaoImpl<Authorization, Long> implements AuthorizationDao{

	public boolean match(Authorization authorization) {
		Query query = this.getSession().createQuery("from "+Authorization.class.getName()+" p where p.account='"+authorization.getAccount()+"' and p.password='"+authorization.getPassword()+"'");
		return query.uniqueResult()!=null;
	}
}
